<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>更新电影-郫县电影</title>
<link rel="short icon"  href="/photo/head.png"/>
<style type="text/css">
	.left{    
		    width: 200px;
		    height: 750px;
		    float: left; 
		    background-color: #f4f3f4;
		    text-align: center;
		    border-right: 1px solid #d8d8d8;
	}
	.left h1 {
	    margin-top: 40px;
	    margin-bottom: 30px;
	    font-size: 22px;
	    color: #222;
	    font-weight: 400;
	}
	.right{
		position: absolute;
		left: 225px;
		top: 20px;
		/*width: 1200px;*/
		border: 1px solid #d8d8d8;
	}
	body{
		/*height: 750px;*/
		border-top: 2px solid #d8d8d8;
		border-bottom: 2px solid #d8d8d8;
	}
	.left a {
	    display: block;
	    font-weight: 400;
	    color: #333;
	    height: 40px;
	    width: 202px;
	    margin-left: -1px;
	    line-height: 40px;
	    font-size: 18px;
	    text-decoration: none;
	}
	.left .updateMovie{
		color: #9b9191;
	}
	.left .active{
		color: #fff;
		background-color: #ed3931;
	}
	.left form>input{
		opacity: 0;
		height: 40px;
		width: 202px;
		z-index: 1;
	}
	.left .form1{
		position: absolute;
		top:150px;	
	}
	.left .form2{
		position: absolute;
		top:190px;
	}
	.right table{
		margin: 0 75px;
	}
	.right .profile-title {
	    padding: 20px;
	    color: #ec443f;
	    font-size: 18px;
	    border-bottom: 1px solid #e1e1e1;
	    border-top: 1px solid #e1e1e1;
	    margin: 30px 10px;
	}
	table{
		border-spacing: 12px 10px;	
	}
	tr>td>a{
		cursor: pointer;
		border-radius: 5px;
		text-align:center;
	    width: 100px;
	    height: 40px;
	    color: #fff;
	    font-size: 18px;
	    line-height: 40px;
	    border: none;
	    background-color: #ed3931;
	    padding: 0;
	    float: left;
	    text-decoration: none;
	    margin-top: 10px;
	}
	.right form{
		margin: 0 0 20px 70px;
	}
	.right form>input{
		position: relative;
		left:20px;
		padding-left:5px;
		width: 169px;
		margin-bottom: 10px;
	}
	.right form>input[type=submit]{
		cursor: pointer;
	    border-radius: 5px;
	    width: 100px;
	    height: 40px;
	    color: #fff;
	    font-size: 18px;
	    line-height: 40px;
	    border: none;
	    background-color: #ed3931;
	    padding: 0;
	    float: left;
	}
	form>input[type=date]{
		height: 15px;
		padding: 1px 0px 1px 5px;
	}
</style>
</head>
<body>
	<div class="left">
		<h1>影片基本操作</h1>
		<a href="/filmFindAll">基本信息</a>
		<a >添加影片</a>
		<form class="form1" action="/filmInsert" method="get">
				<input type="submit" value="添加影片"/>
		</form>
		<a >删除影片</a>
		<form class="form2" action="/filmDelete" method="get">
			<input type="submit" value="删除影片"/>
		</form>
		<a class="active">修改影片</a>
	</div>
	<div class="right">
		<table>
			<thead>
				<tr>
					<th>电影名称</th>
					<th>导演</th>
					<th>封面</th>
					<th>类型</th>
					<th>主演</th>
					<th>国家</th>
					<th>影片时长</th>
					<th>上映时间</th>
					<th>评分</th>
					<th>介绍</th>
					<th>是否热映</th>
				</tr>
			</thead>
			<tbody>
			
					<td>${requestScope.film.filmName }</td>
					<td>${requestScope.film.director }</td>
					<td><img src=${requestScope.film.cover }></td>
					<td>${requestScope.film.type }</td>
					<td>${requestScope.film.leads }</td>
					<td>${requestScope.film.country }</td>
					<td style="width:70px">${requestScope.film.filmLength }分钟</td>
					<td style="width:100px">${requestScope.film.releaseDateString }</td>
					<td>${requestScope.film.score }</td>
					<td style="width:350px">${requestScope.film.introduction }</td>
					<td>${requestScope.film.reying }</td>
						
					</tr>
				
				<!--<tr>
					<td>
						<a href="/filmFindAll">返回主界面</a>
					</td>
				</tr>-->
			</tbody>
		</table>
		<div class="profile-title">
			请在下方修改电影信息
		</div>
		<form action="/filmupdate" method="post">
			
		电影名称:<input type="text" name="filmName" value="${requestScope.film.filmName } " disabled="disabled"/><br/>
		导演:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="director" value="${requestScope.film.director }"/><br/>
		封面:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="cover" value="${requestScope.film.cover }"/><br/>
		类型:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="type" value="${requestScope.film.type }"/><br/>
		主演:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="leads" value="${requestScope.film.leads }"/><br/>
		国家:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="country" value="${requestScope.film.country }"/><br/>
	  	时长:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	  	<input type="number" name="filmLength" value="${requestScope.film.filmLength }"/> <br/> 
	  	上映时间:<input type="date" name="releaseDate" value="${requestScope.film.releaseDateString }"/><br/> 
		评分:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="number" name="score" value="${requestScope.film.score }"/><br/>
		介绍:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="introduction" value="${requestScope.film.introduction }"/><br/>
		热映:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="text" name="reying" value="${requestScope.film.reying }"/><br/>
		
		
		
		<input type="hidden" name="filmName" value="${requestScope.film.filmName }" />
		<input type="hidden" name="movieId" value="${requestScope.film.movieId} " /><br/>
		<input type="submit" value="提交"/>
		<c:choose>
			<c:when test="${requestScope.cuowu == 1 }">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red">信息有误!</span>
			</c:when>
			<c:otherwise>
				<span></span>
			</c:otherwise>
		</c:choose>
			
		</form>
	</div>
</body>
</html>